package com.行为型模型.P责任链模式;

public class Test {
    public static void main(String[] args) {
        //请假条来一张        
        LeaveRequest leave = new LeaveRequest("小花",8,"身体不适");
        //各位领导        
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);
        groupLeader.submit(leave);
    }
}
